<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="jdic.dtd" xmlns:wmh="http://www.wmhelp.com/2003/eGenerator" elementFormDefault="qualified" targetNamespace="jdic.dtd">
  <xs:element name="JMdict">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="entry" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="entry">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ent_seq"/>
        <xs:element ref="k_ele" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="r_ele" maxOccurs="unbounded"/>
        <xs:element ref="info" minOccurs="0"/>
        <xs:element ref="sense" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ent_seq" type="xs:string"/>
  <xs:element name="k_ele">
    <xs:annotation>
      <xs:documentation> A unique numeric sequence number for each entry
</xs:documentation>
      <xs:documentation> This element records the information about the source
language(s) of a loan-word/gairaigo. If the source language is other 
than English, the language is indicated by the lang attribute.
The element value (if any) is the source word or phrase.
</xs:documentation>
      <xs:documentation> The lang attribute defines the language(s) from which
a loanword is drawn.  It will be coded using the three-letter language 
code from the ISO 639-2 standard. When absent, the value "eng" (i.e. 
English) is the default value. The bibliographic (B) codes are used. 
</xs:documentation>
      <xs:documentation> The ls_type attribute indicates whether the lsource element
fully or partially describes the source word or phrase of the
loanword. If absent, it will have the implied value of "full".
Otherwise it will contain "part".  </xs:documentation>
      <xs:documentation> Within each sense will be one or more "glosses", i.e. 
target-language words or phrases which are equivalents to the 
Japanese word. This element would normally be present, however it 
may be omitted in entries which are purely for a cross-reference.
</xs:documentation>
      <xs:documentation> The lang attribute defines the target language of the
gloss. It will be coded using the three-letter language code from
the ISO 639 standard. When absent, the value "eng" (i.e. English)
is the default value. </xs:documentation>
      <xs:documentation> The sense-information elements provided for additional
information to be recorded about a sense. Typical usage would
be to indicate such things as level of currency of a sense, the
regional variations, etc.
</xs:documentation>
      <xs:documentation> The following entity codes are used for common elements within the
various information fields.
</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="keb"/>
        <xs:element ref="ke_inf" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="ke_pri" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="keb" type="xs:string">
    <xs:annotation>
      <xs:documentation> The kanji element, or in its absence, the reading element, is 
the defining component of each entry.
The overwhelming majority of entries will have a single kanji
element associated with a word in Japanese. Where there are 
multiple kanji elements within an entry, they will be orthographical
variants of the same word, either using variations in okurigana, or
alternative and equivalent kanji. Common "mis-spellings" may be 
included, provided they are associated with appropriate information
fields. Synonyms are not included; they may be indicated in the
cross-reference field associated with the sense element.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="ke_inf" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element will contain a word or short phrase in Japanese 
which is written using at least one non-kana character (usually kanji,
but can be other characters). The valid characters are
kanji, kana, related characters such as chouon and kurikaeshi, and
in exceptional cases, letters from other alphabets.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="ke_pri" type="xs:string">
    <xs:annotation>
      <xs:documentation> This is a coded information field related specifically to the 
orthography of the keb, and will typically indicate some unusual
aspect, such as okurigana irregularity.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="r_ele">
    <xs:annotation>
      <xs:documentation> This and the equivalent re_pri field are provided to record
information about the relative priority of the entry,  and consist
of codes indicating the word appears in various references which
can be taken as an indication of the frequency with which the word
is used. This field is intended for use either by applications which 
want to concentrate on entries of  a particular priority, or to 
generate subset files. 
The current values in this field are:
- news1/2: appears in the "wordfreq" file compiled by Alexandre Girardi
from the Mainichi Shimbun. (See the Monash ftp archive for a copy.)
Words in the first 12,000 in that file are marked "news1" and words 
in the second 12,000 are marked "news2".
- ichi1/2: appears in the "Ichimango goi bunruishuu", Senmon Kyouiku 
Publishing, Tokyo, 1998.  (The entries marked "ichi2" were
demoted from ichi1 because they were observed to have low
frequencies in the WWW and newspapers.)
- spec1 and spec2: a small number of words use this marker when they 
are detected as being common, but are not included in other lists.
- gai1/2: common loanwords, based on the wordfreq file.
- nfxx: this is an indicator of frequency-of-use ranking in the
wordfreq file. "xx" is the number of the set of 500 words in which
the entry can be found, with "01" assigned to the first 500, "02"
to the second, and so on. (The entries with news1, ichi1, spec1 and 
gai1 values are marked with a "(P)" in the EDICT and EDICT2
files.)

The reason both the kanji and reading elements are tagged is because 
on occasions a priority is only associated with a particular
kanji/reading pair.
</xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="reb"/>
        <xs:element ref="re_nokanji" minOccurs="0"/>
        <xs:element ref="re_restr" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_inf" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="re_pri" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="reb" type="xs:string">
    <xs:annotation>
      <xs:documentation> The reading element typically contains the valid readings
of the word(s) in the kanji element using modern kanadzukai. 
Where there are multiple reading elements, they will typically be
alternative readings of the kanji element. In the absence of a 
kanji element, i.e. in the case of a word or phrase written
entirely in kana, these elements will define the entry.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="re_nokanji" type="xs:string">
    <xs:annotation>
      <xs:documentation> this element content is restricted to kana and related
characters such as chouon and kurikaeshi. Kana usage will be
consistent between the keb and reb elements; e.g. if the keb
contains katakana, so too will the reb.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="re_restr" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element, which will usually have a null value, indicates
that the reb, while associated with the keb, cannot be regarded
as a true reading of the kanji. It is typically used for words
such as foreign place names, gairaigo which can be in kanji or
katakana, etc.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="re_inf" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element is used to indicate when the reading only applies
to a subset of the keb elements in the entry. In its absence, all
readings apply to all kanji elements. The contents of this element 
must exactly match those of one of the keb elements.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="re_pri" type="xs:string">
    <xs:annotation>
      <xs:documentation> General coded information pertaining to the specific reading.
Typically it will be used to indicate some unusual aspect of 
the reading. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="info">
    <xs:annotation>
      <xs:documentation> See the comment on ke_pri above. </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="links" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="bibl" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="etym" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="audit" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="bibl">
    <xs:annotation>
      <xs:documentation> general coded information relating to the entry as a whole.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="bib_tag" minOccurs="0"/>
        <xs:element ref="bib_txt" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="bib_tag" type="xs:string"/>
  <xs:element name="bib_txt" type="xs:string"/>
  <xs:element name="etym" type="xs:string">
    <xs:annotation>
      <xs:documentation> Bibliographic information about the entry. The bib_tag will a 
coded reference to an entry in an external bibliographic database.
The bib_txt field may be used for brief (local) descriptions.</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="links">
    <xs:annotation>
      <xs:documentation> This field is used to hold information about the etymology
of the kanji or kana parts of the entry. For gairaigo,
etymological information may also be in the &lt;lsource&gt; element.
</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="link_tag"/>
        <xs:element ref="link_desc"/>
        <xs:element ref="link_uri"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="link_tag" type="xs:string"/>
  <xs:element name="link_desc" type="xs:string"/>
  <xs:element name="link_uri" type="xs:string"/>
  <xs:element name="audit">
    <xs:annotation>
      <xs:documentation> This element holds details of linking information to 
entries in other electronic repositories. The link_tag will be
coded to indicate the type of link (text, image, sound), the 
link_desc will provided a textual label for the link, and the 
link_uri contains the actual URI.  </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="upd_date"/>
        <xs:element ref="upd_detl"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="upd_date" type="xs:string"/>
  <xs:element name="upd_detl" type="xs:string"/>
  <xs:element name="sense">
    <xs:annotation>
      <xs:documentation> The audit element will contain the date and other information
about updates to the entry. Can be used to record the source of 
the material. </xs:documentation>
      <xs:documentation>                                                                   </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="stagk" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="stagr" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="pos" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="xref" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="ant" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="field" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="misc" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="s_inf" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="lsource" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="dial" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="gloss" minOccurs="0" maxOccurs="unbounded"/>
        <xs:element ref="example" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="stagk" type="xs:string">
    <xs:annotation>
      <xs:documentation> The sense element will record the translational equivalent
of the Japanese word, plus other related information. Where there
are several distinctly different meanings of the word, multiple
sense elements will be employed.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="stagr" type="xs:string"/>
  <xs:element name="xref" type="xs:string">
    <xs:annotation>
      <xs:documentation> These elements, if present, indicate that the sense is restricted
to the lexeme represented by the keb and/or reb. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="ant" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element is used to indicate a cross-reference to another
entry with a similar or related meaning or sense. The content of
this element is typically a keb or reb element in another entry. In some
cases a keb will be followed by a reb and/or a sense number to provide
a precise target for the cross-reference. Where this happens, a JIS
"centre-dot" (0x2126) is placed between the components of the 
cross-reference.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="pos" type="xs:string">
    <xs:annotation>
      <xs:documentation> This element is used to indicate another entry which is an
antonym of the current entry/sense. The content of this element
must exactly match that of a keb or reb element in another entry.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="field" type="xs:string">
    <xs:annotation>
      <xs:documentation> Part-of-speech information about the entry/sense. Should use 
appropriate entity codes. In general where there are multiple senses
in an entry, the part-of-speech of an earlier sense will apply to
later senses unless there is a new part-of-speech indicated.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="misc" type="xs:string">
    <xs:annotation>
      <xs:documentation> Information about the field of application of the entry/sense. 
When absent, general application is implied. Entity coding for 
specific fields of application. </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="lsource">
    <xs:annotation>
      <xs:documentation> This element is used for other relevant information about 
the entry/sense. As with part-of-speech, information will usually
apply to several senses.
</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:simpleContent>
        <xs:extension base="xs:string">
          <xs:attribute name="lang" type="xs:string" default="eng"/>
          <xs:attribute name="ls_type" type="xs:string"/>
          <xs:attribute name="ls_wasei" type="xs:string"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="dial" type="xs:string">
    <xs:annotation>
      <xs:documentation> The ls_wasei attribute indicates that the Japanese word
has been constructed from words in the source language, and
not from an actual phrase in that language. Most commonly used to
indicate "waseieigo". </xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="gloss">
    <xs:annotation>
      <xs:documentation> For words specifically associated with regional dialects in
Japanese, the entity code for that dialect, e.g. ksb for Kansaiben.
</xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="pri"/>
      </xs:choice>
      <xs:attribute name="lang" type="xs:string" default="eng"/>
      <xs:attribute name="g_gend" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="pri" type="xs:string">
    <xs:annotation>
      <xs:documentation> The g_gend attribute defines the gender of the gloss (typically
a noun in the target language. When absent, the gender is either
not relevant or has yet to be provided.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="example" type="xs:string">
    <xs:annotation>
      <xs:documentation> These elements highlight particular target-language words which 
are strongly associated with the Japanese word. The purpose is to 
establish a set of target-language words which can effectively be 
used as head-words in a reverse target-language/Japanese relationship.
</xs:documentation>
    </xs:annotation>
  </xs:element>
  <xs:element name="s_inf" type="xs:string">
    <xs:annotation>
      <xs:documentation> The example elements provide for pairs of short Japanese and
target-language phrases or sentences which exemplify the usage of the 
Japanese head-word and the target-language gloss. Words in example 
fields would typically not be indexed by a dictionary application.
</xs:documentation>
    </xs:annotation>
  </xs:element>
</xs:schema>
